// 封装与用户登录相关的接口函数
import http from "../utils/http"
// 用户登录接口
export const userLoginAPI= (data:any) => {
    return http({
        url: "/users/login",
        method: "post",
        data,
    })
}
// 管理员列表接口
export const getAdminAPI= (params:any) => {
    return http({
        url: "/users/getUserList",
        method: "get",
        params,
    })
}
// 添加管理员
export let addAPI = (data: any) => {
    return http({
      url: "/users/addUser",
      method: "post",
      data,
    });
  };
  
  // 修改管理员
  export let changeAPI = (data: any) => {
    return http({
      url: "/users/updateUser",
      method: "post",
      data,
    });
  };
  // 删除管理员
  export let delAPI = (params: any) => {
    return http({
      url: "/users/deleteUser",
      method: "get",
      params,
    });
  };
  // 修改密码
  export let changePwdAPI = (data: any) => {
    return http({
      url: "/users/changePwd",
      method: "post",
      data,
    });
  };
  